package com.qijian.business.domain.query;

import java.math.BigDecimal;

import com.qijian.common.utils.mybatis.WhereType;
import com.qijian.common.utils.mybatis.WhereTypeEnum;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.Set;
import lombok.ToString;
import com.baomidou.mybatisplus.annotation.TableName;


/**
 * 报工对象 查询条件类
 *
 * @author qijian
 * @date 2025-03-25
 */

@Data
@ToString
@TableName("production_detail")
public class ProductionDetailQuery {

    @WhereType(filed = "id")
    private String id;
    @WhereType(filed = "id", type = WhereTypeEnum.IN)
    private Set<Long> ids;
    @WhereType(filed = "work_order_id")
    private Long workOrderId;
    @WhereType(filed = "process_order_detail_id")
    private Long processOrderDetailId;
    @WhereType(filed = "finish_qty")
    private BigDecimal finishQty;
    @WhereType(filed = "work_waste_qty")
    private BigDecimal workWasteQty;
    @WhereType(filed = "is_check")
    private Boolean isCheck;
    @WhereType(filed = "feed_waste_qty")
    private BigDecimal feedWasteQty;
    @WhereType(filed = "fm_process_id")
    private Long fmProcessId;
    @WhereType(filed = "process_name")
    private String processName;
    @WhereType(filed = "sort")
    private Long sort;
    @WhereType(filed = "user_id")
    private Long userId;
    @WhereType(filed = "user_name")
    private String userName;
    @WhereType(filed = "craft_id")
    private Long craftId;
    @WhereType(filed = "bad_number")
    private BigDecimal badNumber;
    @WhereType(filed = "package_no")
    private String packageNo;
    @WhereType(filed = "is_subcontracted")
    private Boolean isSubcontracted;
    @WhereType(filed = "remark")
    private String remark;
    @WhereType(filed = "scrap_qty")
    private BigDecimal scrapQty;
    @WhereType(filed = "dispatch_id")
    private Long dispatchId;

    @WhereType(filed = "create_time",tableName = "production_detail_salary", type = WhereTypeEnum.GE)
    private LocalDateTime startOfDay;
    @WhereType(filed = "create_time",tableName = "production_detail_salary", type = WhereTypeEnum.LT)
    private LocalDateTime endOfDay;



    @WhereType(filed = "item_name",tableName = "wo", type = WhereTypeEnum.LIKE)
    private String topItemName;

    @WhereType(filed = "order_no",tableName = "sc_work_order", type = WhereTypeEnum.LIKE)
    private String orderNo;

    @WhereType(filed = "item_name",tableName = "sc_work_order", type = WhereTypeEnum.LIKE)
    private String itemName;

    @WhereType(filed = "item_code",tableName = "sc_work_order")
    private String itemCode;

    @WhereType(filed = "item_code",tableName = "sc_work_order", type = WhereTypeEnum.LIKE)
    private String itemCodeLike;

    @WhereType( filed = "create_time", func = "date_format({2},'%Y-%m-%d') = {1}",tableName = "production_detail_salary")
    private String date;

    @WhereType(filed = "user_id",tableName = "production_detail_salary")
    private Long userIdSalary;


}
